package model;

import java.awt.Color;

import controller.Spiel;

public class Spieler {
	private Color farbe;
	private String name;
	private char leftKey;
	private char rightKey;
	private boolean leftPressed;
	private boolean rightPressed;
	private boolean tot;
	private Linie linie;
	private int punkte;

	public Spieler(String name, Color farbe, char leftKey, char rightKey) {
		this.farbe = farbe;
		this.name = name;
		this.linie = new Linie();
		this.leftKey = leftKey;
		this.rightKey = rightKey;
		this.tot = false;
	}

	public void setPunkte(int punkte) {
		this.punkte = punkte;
		Spiel.CURRENT_SPIEL.updatePunkte();
	}

	public boolean isTot() {
		return tot;
	}

	public void setTot(boolean tot) {
		this.tot = tot;
	}

	public Color getFarbe() {
		return farbe;
	}

	public void setFarbe(Color farbe) {
		this.farbe = farbe;
	}

	public String getName() {
		return name;
	}

	public char getLeftKey() {
		return leftKey;
	}

	public char getRightKey() {
		return rightKey;
	}

	public int getPunkte() {
		return this.punkte;
	}

	public Linie getLinie() {
		return linie;
	}

	public boolean isLeftPressed() {
		return leftPressed;
	}

	public boolean isRightPressed() {
		return rightPressed;
	}

	public void setLeftPressed(boolean leftPressed) {
		this.leftPressed = leftPressed;
	}

	public void setRightPressed(boolean rightPressed) {
		this.rightPressed = rightPressed;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setRightKey(char key) {
		this.rightKey = key;
	}

	public void setLeftKey(char leftKey) {
		this.leftKey = leftKey;
	}

	public void setLinie(Linie linie) {
		this.linie = linie;
	}
}
